package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the ATTENDANCERULE database table.
 * 
 */
@Entity
@NamedQuery(name="Attendancerule.findAll", query="SELECT a FROM Attendancerule a")
public class Attendancerule implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="ATTENDANCERULE_ATTRUID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="ATTENDANCERULE_ATTRUID_GENERATOR")
	@Column(name="ATTRU_ID")
	private long attruId;

	@Column(name="ATTRU_AFFAIR")
	private String attruAffair;

	@Column(name="ATTRU_ENDUPDATE")
	private Timestamp attruEndupdate;

	@Column(name="ATTRU_FOUNDDATE")
	private Timestamp attruFounddate;

	@Column(name="ATTRU_NAME")
	private String attruName;

	@Column(name="ATTRU_PERSON")
	private String attruPerson;

	@Column(name="ATTRU_REMARKS")
	private String attruRemarks;

	@Column(name="ATTRU_REPEAT")
	private String attruRepeat;

	@Column(name="ATTRU_STATE")
	private BigDecimal attruState;

	@Column(name="ATTRU_UPDATE")
	private Timestamp attruUpdate;

	//bi-directional many-to-one association to Kaoqinrule
	@OneToMany(mappedBy="attendancerule")
	@JSONField(serialize=false)
	private List<Kaoqinrule> kaoqinrules;

	public Attendancerule() {
	}

	public long getAttruId() {
		return this.attruId;
	}

	public void setAttruId(long attruId) {
		this.attruId = attruId;
	}

	public String getAttruAffair() {
		return this.attruAffair;
	}

	public void setAttruAffair(String attruAffair) {
		this.attruAffair = attruAffair;
	}

	public Timestamp getAttruEndupdate() {
		return this.attruEndupdate;
	}

	public void setAttruEndupdate(Timestamp attruEndupdate) {
		this.attruEndupdate = attruEndupdate;
	}

	public Timestamp getAttruFounddate() {
		return this.attruFounddate;
	}

	public void setAttruFounddate(Timestamp attruFounddate) {
		this.attruFounddate = attruFounddate;
	}

	public String getAttruName() {
		return this.attruName;
	}

	public void setAttruName(String attruName) {
		this.attruName = attruName;
	}

	public String getAttruPerson() {
		return this.attruPerson;
	}

	public void setAttruPerson(String attruPerson) {
		this.attruPerson = attruPerson;
	}

	public String getAttruRemarks() {
		return this.attruRemarks;
	}

	public void setAttruRemarks(String attruRemarks) {
		this.attruRemarks = attruRemarks;
	}

	public String getAttruRepeat() {
		return this.attruRepeat;
	}

	public void setAttruRepeat(String attruRepeat) {
		this.attruRepeat = attruRepeat;
	}

	public BigDecimal getAttruState() {
		return this.attruState;
	}

	public void setAttruState(BigDecimal attruState) {
		this.attruState = attruState;
	}

	public Timestamp getAttruUpdate() {
		return this.attruUpdate;
	}

	public void setAttruUpdate(Timestamp attruUpdate) {
		this.attruUpdate = attruUpdate;
	}

	public List<Kaoqinrule> getKaoqinrules() {
		return this.kaoqinrules;
	}

	public void setKaoqinrules(List<Kaoqinrule> kaoqinrules) {
		this.kaoqinrules = kaoqinrules;
	}

	public Kaoqinrule addKaoqinrule(Kaoqinrule kaoqinrule) {
		getKaoqinrules().add(kaoqinrule);
		kaoqinrule.setAttendancerule(this);

		return kaoqinrule;
	}

	public Kaoqinrule removeKaoqinrule(Kaoqinrule kaoqinrule) {
		getKaoqinrules().remove(kaoqinrule);
		kaoqinrule.setAttendancerule(null);

		return kaoqinrule;
	}

}